﻿<div>
    <RadioGroup @bind-Value="mode" Style="margin-bottom: 8px;">
        <Radio RadioButton Value="@TabPosition.Top">Horizontal</Radio>
        <Radio RadioButton Value="@TabPosition.Left">Vertical</Radio>
    </RadioGroup>
    <Tabs DefaultActiveKey="0" TabPosition="@mode" Style="height: 220px;">
        @for (int i = 0; i < 30; i++)
        {
            <TabPane Key="@($"{i}")">
                <Tab>Tab-@i</Tab>
                <ChildContent>Content of tab Pane @i</ChildContent>
            </TabPane>
        }
    </Tabs>
</div>

@code{
    private string mode = TabPosition.Top;

    RenderFragment<int> template = (i) =>@<TabPane Key="@i.ToString()">
        <Tab>Tab-@i</Tab>
        <ChildContent>Content of tab Pane @i</ChildContent>
    </TabPane>;

}